home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
os2tools
/
hos20001
/
readme.doc
next >
Wrap
Text File
|
1990-03-26
|
9KB
|
221 lines
This Zip package contains the source code for REVISOR.ASM,
which is the OS/2 assembler version.
At any rate the history of this code is one I hope most of us can
appreciate and will follow suit with my ideas behind it.
I have recently finished the book HACKERS by Steven Levy. A book that
describes where the world, and works, of the original hackers started
and then progressed through time.
Needless to say I will not rewrite the book, find it if you can, but
I would like to point out that a hacker was defined as someone who
felt an affinity with the machine at their fingertips. With this
souped up attitude the 'hacker' would spend hours, upon days, upon
years making the machine sing to the caress of their instructions.
If what they were coding was nothing more then a robot control system
or the screen routines for a primitive Star Wars Game, they conducted
their work with a relentless vigor that teams of 'society' programmers
could not compare with.
So, there I sat ITCHING for something to code, please no psycho analysis,
and I realized that often times I wished I had backed up some code
before modifications so that I could restore the original version once
I found that my changes blew up. At one point I had looked into source
code librarian software but the price was ( is ) more then I could afford.
Thus was born REVISOR, currently in a very, very, incomplete and simple
cycle, but here lay the plot:
For my purpose, a 'hack' is considered to be a modification, change,
correction, addition, a supercharge, a port, a anything done to this
code for the sake of the 'hack'.
I hereby release this code ( both OS/2 and DOS versions ) to the public
domain. In doing so I also reserve the right to make requirements for
the people who adopt it:
1. Make it faster.
2. Make it cleaner.
3. Add neat functions, don't waste time with crap that you wouldn't
use.
4. Debug it if needed, I ain't perfect.
5. Keep it clean.
6. Enjoy the puss out of it.
7. Enjoy the art of the hack!
8. Most of all reload it onto the BBS systems of the world, a your
revision notes to the source code, so that others may take a
wHACK at it as well. You never know, your hack may inspire an
even greater one to evolve.
Oh, one other thing, in the REVISOR token structure there is a
Sig field of type unsigned integer. Notice in the main body I
initialize this to 0x434a5646, this is CJVF which is FVJC backwords
which is Frank V.J. Castellucci which is my name.
*************** The Hackers Ethic ********************
Access to computers - and anything which might teach
you something about the way the world works - should
be unlimited and total. Always yield to the Hands-On Imperative!
All Information should be free.
Mistrust Authority - Promote Decentralization.
Hackers should be judged by their hacking, not bogus criteria
such as degrees, age, race, or position.
You can create art and beauty on a computer.
******************** Hack Notes ********************
Revisor is a simple incarnation of a source librarian storage routine.
It takes as arguments:
revisor target.src
Where: target.src is the input file to be placed into the
revisor catalog.
This file will also define a key to the
revise token structure to be used for restoration
identification or some other need.
The revisor catalog will be named target.rev,
in other words the base name of the target file
with the extension of '.REV'.
-OR-
revisor target.src alternt.rev
Where alternt.rev is the alternative name of the catalog to store
the target file to.
-OR-
revisor target.src alternt.rev alternt.inp
Where alternt.inp is the alternative input data into the catalog.
This is usefull for storing many targets that
make up a project.
-OR-
revisor target.src , alternt.inp
Where , ( comma ) tells revisor to use the default catalog, see
the above description, but still provide an
alternate input.
I guess you can tell the parameters are positional, but they don't
need to stay this way.
The assembler version adds two (2) new switches that will work under
with the new *.REV files as well as any old ones created with the
original 'C' version.
Key: Req = Required syntax
Opt = Optional
Switch -L
Syntax: REVISOR keyname.ext [-l | -L | /l | /L] altcat.rev
Req Req Req Opt
The -L switch is used to list information for a key, the key is
described as this:
C:\revisor file.c -l
This will cause revisor to search the default catalog ( FILE.REV )
for all entrys that have a filename or alternate name of file.c
To use a catalog other then the default you must specify after the
switch:
C:\revisor file.c -l altcat.rev
This will cause revisor to search the ALTCAT.REV file for any
entries that match the key name, file.c in this example.
Switch -D
Syntax: REVISOR [-d | -D | /d | /D] catalog.rev
Req Req Req
The -D switch is used to dump all key and alternate information
without regard to criteria.
C:\revisor -d file.rev -or-
C:\revisor -d altcat.rev
These examples list every entry in the respective catalogs.
I reduced the amount of error information in case you use this in
a make file and don't want to see abunch of garbage on the screen.
MAKE FILE USAGE EXAMPLE ( MS Make Version )
somecode.obj: somecode.c
cl -c $(MYFLAGS) somecode.c
revisor somecode.c
revisor -d somecode.rev > catlist.txt
************* Operation of Revisor ******************
Providing the target and/or alternate input files are valid, revisor
will create a Revisor Token which consists of:
filename used as a key for recovery, search, whatever
alternate name used for input file source under filename key
Date Stamp of last write date for input file
Time Stamp of last write time for input file
Signature
Length of data following the token
It then appends this token to the end of the catalog in use.
After which it then appends the target or alternate target following
the token.
Diagram
Catalog File
BYTE 0 -> Revisor Token ( see above and source code )
DATA
Revisor Token
DATA
Revisor Token
DATA
and so on...
Thats it, I tried to document the source as good as I did, another
reason why I need a routine like this is because I NEVER document
stuff I should.
To assemble this under os/2:
masm -Ml revisor.asm;
link revisor.obj,,,os/2;
Couple of hacks off the bat:
Add a routine to restore the revised code into a file.
Make a DOS version, shouldn't be too hard to do as the functions
VioWrtTTY can be substituted with printf or the like and the
DosOpen, DosFindFirst, DosRead and DosWrite are the younger siblings
of the DOS versions of the same.
Create a routine which is able to deal with the catalogs! Makes sense.
Add the ability to compress the file before storing it in the catalog.
Forget all I just said and do what you want!
Frank